<p><p><table><tr><td valign=middle><%= show_icon("contact-new","/login/guest/"+ @patient.wedgetail,"Guest access card","Create a Guest Access Card","large") -%></td>
<td><%= button_to 'Create a one-time use Guest Pass', :controller=>"login",:action => 'guest', :wedgetail => @patient.wedgetail %></td></tr></table>
<pre><p>You can create a 'Guest Access Card' which provides a username and password for someone to access your record on one occasion only.
This is designed to be used when you are visiting a health provider who is not registered with the wedgetail System, or for emergency use.
For your records and for audit purposes, you should record the person to whom you give a guest card in the table below.
</pre
<h2>Guests</h2>
<table>
<tr>
	<td>Username</td>
	<td>Accessed</td>
	<td>Given Name</td>
	<td>Family Name</td>
	<td></td>
</tr>
<% for @guest in @guests %>
	
	<tr>
		<% form_for :user, @guest do |form| %>
		<td><%= @guest.username %></td>
		<td><%= @guest.last_access %></td>
		<td><%= form.text_field :given_names, :size=>15 %></td>
		<td><%= form.text_field :family_name, :size=>15 %><%= form.hidden_field :username %></td>
			
		<td>	<%= submit_tag%></td>
		<% end %>	

			
	</tr>
<% end %>
</table>
<%= link_to "Back ", :action=> :show, :id=>@patient.wedgetail %>